def is_palindrome(value):
    min = 0
    max = len(value) - 1

    # Scan string for letter equality at each end.
    # ... Move indexes closer to the center after each check.
    while True:

        # Return true if all characters were checked.
        if min > max:
            return True;

        a = value[min]
        b = value[max]

        # Return false is characters are not equal.
        if a != b:
            return False;

        # Move inwards.
        min += 1
        max -= 1


if is_palindrome("anna"):
    print("Palindrome:    ")
else:
    print("Not palindrome:")
